﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using KPIS.GERP.GHRMS.MODEL;
using System.Data;

namespace KPIS.GERP.GHRMS.IBLL
{
    public interface IEmployeeBLL
    {
        IList<EmployeeInfo> ListEmployees();
        IList<EmployeeInfo> ListEmployees(string Sequence);        
        IList<hrm_ps_employees> GetEmployees(string EmpSeq, string EmployeeType, string JobSites);
        IList<EmployeeInfo> ListEmployeeByTypes(string EmployeeType, string JobSites, string YearRetire);
        IList<EmployeeInfo> ListEmployeeByTypes(string EmployeeType, string JobSites, string YearRetire, string YearRetireTo);
        DataSet LoadEmployeeRetire(string EmpTypeSequence, int StartRetire, int EndRetire, bool bActive, string SearchText);
        DataSet LoadEmployees(Nullable<int> Sequence, string EmpTypeSequence, bool bActive, string SearchText);
        DataSet LoadEmployees(Nullable<int> Sequence, string EmpTypeSequence, bool bActive, string SearchText, string EmpStatusSequence);
        DataSet LoadEmployees(Nullable<int> Sequence, string EmpTypeSequence, Nullable<int> JobSiteSequence
            , Nullable<int> WorkingJobSiteSequence, bool bActive, string SearchText);
        DataSet LoadToExcel(string EmployeeType, string JobSite, string WorkingJobSite
            , string PositionType, string Class, string FieldPositon, string EduDegree
            , string EduQualification, string EduMajor, string EduInstitutes
            , Nullable<double> WorkingDayCount, Nullable<DateTime> WorkingDayCountDate
            , Nullable<double> AgeCount, Nullable<DateTime> AgeCountDate
            , Nullable<int> KeepClass, Nullable<int> KeepClassCount
            , bool bActive);
        DataSet LoadEmployeeForWorkingOversea(Nullable<int> Sequence, string EmpTypeSequence
            , Nullable<int> WorkingJobSiteSequence, int DurationOversea, Nullable<DateTime> StartDateNew
            , string SearchText);
        DataSet LoadEmployeeForApproveCommands();
        DataSet Detail();
        //DataTable ListEmployeeByTypes(string EmployeeType, string class_seq);
        string Insert(string FirstName, string LastName, string FirstNameEng, string LastNameEng
            , string NickName, string Citizen, string TaxPayer, string Social, string Official, string NamePrefix
            , string Gender, string Religion, string RaceNationalities, string Nationalities
            , string BloodGroup, Nullable<DateTime> BirthDate, Nullable<DateTime> DeathDate
            , string EmployeeType, string Class, Nullable<int> SalaryLevel, Nullable<double> Salary
            , string Position, string WorkingJobSite, Nullable<DateTime> AdmittedDate, Nullable<DateTime> WorkStartDate
            , Nullable<DateTime> QuitDate, string Status, bool FundMember
            , Nullable<DateTime> ProbationEndDate, Nullable<DateTime> LatestPositionDate
            , Nullable<DateTime> LatestClassDate, Nullable<DateTime> LatestWorkingJobSiteDate,
            int CreatedBy, string MaritalStatus, string CodeScan, int? PositionType, string imageUnique = "" , string ExecPosition = "");
        void Update(int Sequence, string FirstName, string LastName, string FirstNameEng, string LastNameEng
            , string NickName, string Citizen, string TaxPayer, string Social, string Official, string NamePrefix
            , string Gender, string Religion, string RaceNationalities, string Nationalities
            , string BloodGroup, Nullable<DateTime> BirthDate, Nullable<DateTime> DeathDate
            , string EmployeeType, string Class, Nullable<int> SalaryLevel, Nullable<double> Salary
            , string Position, string WorkingJobSite, Nullable<DateTime> AdmittedDate, Nullable<DateTime> WorkStartDate
            , Nullable<DateTime> QuitDate, string Status, bool FundMember, string MaritalStatus
            , Nullable<DateTime> ProbationEndDate, Nullable<DateTime> LatestPositionDate
            , Nullable<DateTime> LatestClassDate, Nullable<DateTime> LatestWorkingJobSiteDate, string CodeScan, int UpdatedBy
            , int? PositionType, string imageUnique = "", string ExecPosition = "");

        void UpdateSingleField(int Sequence, string fieldName, object fieldValue, int updateBy);

        void UpdatePersonal(int Sequence, string FirstName, string LastName, string FirstNameEng, string LastNameEng
            , string NickName, string Citizen, string TaxPayer, string Social, string Official, string NamePrefix
            , string Gender, string Religion, string RaceNationalities, string Nationalities
            , string BloodGroup, Nullable<DateTime> BirthDate, Nullable<DateTime> DeathDate, int UpdatedBy);
        void Delete(int Sequence, int UpdatedBy);
        void UploadFile(string DestPath, string ImageName);
        void UploadFileToServer(string DestPath, string ImageName);
        string GetGenderSeq(string NamePrefixSeq);
    }
}
